import React, { Component } from 'react'
import { Text, View } from 'react-native'
import { $fetch } from "../fetch"
import { store } from '../store';
export default class DetailPage extends Component {
    state = {
        MkFamily: [],
        ...store.getState()
    }
    unsubscribe = this.props.navigation.addListener("focus", () => {
        this.setState({ isOkPwd: store.getState().isOkPwd })
        $fetch("/user/ubmfamily", "POST", "", (data) => {
            console.log(data);
        })
    })
    render() {
        return (
            <View>
                {/* 未登录显示 */}
                <View style={{ display: this.state.isOkPwd ? 'flex' : 'none' }}><Text>我登录了</Text></View>


                <View style={{ display: this.state.isOkPwd ? 'none' : 'flex' }}>
                    <Text>请先登录</Text></View>
            </View>
        )
    }
}
